package com.easylinkin.linkappapi.common.model;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.easylinkin.linkappapi.common.translate.Code2Text;
import com.easylinkin.linkappapi.common.translate.UserNameTranslator;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class  BaseEntity<T extends Model<?>>extends Model<T>{
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;

    /**
     * 创建人id
     */
    @Code2Text(translateor = UserNameTranslator.class)
    @TableField("creator_id_")
    private Long creatorId;

    /**
     * 创建日期
     */
    @TableField("create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @Code2Text(translateor = UserNameTranslator.class)
    @TableField("modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField("modify_time_")
    private Date modifyTime;
}
